package com.daodway.designpattern.factorypattern.abstractfactory;

import org.junit.Test;

public class Client {
	@Test
	public void main() {
	    	//红工厂负责生产产品福特和Intel CPU; 
		    RedFacotry factory1 = new RFacotryImpl(); 
		    Car productA1 = factory1.getFord(); 
		    Cpu productB1 = factory1.getIntel(); 
		     
		    productA1.run();	     
		    productB1.execute(); 
		     
		  //橘工厂负责生产产品奔驰和IBM CPU; 
		    OrangeFacotry factory2 = new OFacotryImpl(); 
		    Car productA2 = factory2.getBenz(); 
		    Cpu productB2 = factory2.getIBM(); 
		     
		    productA2.stop();	 
		    productB2.execute(); 

	}

}
